package com.hzit.pay.center.service.impl;

import com.hzit.pay.center.mapper.RefundSerialInfoMapper;
import com.hzit.pay.center.model.RefundSerialInfo;
import com.hzit.pay.center.service.IRefundSerialService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RefundSerialServiceImpl implements IRefundSerialService {

    @Autowired
    private RefundSerialInfoMapper refundSerialInfoMapper;

    @Override
    public List<RefundSerialInfo> queryByOrderId(String orderId) {

        return refundSerialInfoMapper.selectByOrderId(orderId);
    }

    @Override
    public RefundSerialInfo createRefundSerial() {

        RefundSerialInfo refundSerialInfo = new RefundSerialInfo();

        refundSerialInfo.setRefundStatus("退款申请中");

        refundSerialInfoMapper.insertSelective(refundSerialInfo);

        return refundSerialInfo;

    }
}
